<?php
namespace app\admin\model;
class User extends BaseModel
{
    /**
     * 获取当前账号信息
     */
    public function getAccountInfo($id){
        $user = D('account');
        return $user->where("enable",0)->where("id",$id)->find();
    }

    /**
     * 修改密码
     */
    public function passsave($id,$newpwd) {
        $user = D('account');
        $data['id'] = $id;
        $data['passwd'] =  md5(md5($newpwd).config('keys'));
        return $user->update($data);
    }
}
